package cn.gcyl.module.biz.dal.mysql.informationtype;

import java.util.*;

import cn.gcyl.framework.common.pojo.PageResult;
import cn.gcyl.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.gcyl.framework.mybatis.core.mapper.BaseMapperX;
import cn.gcyl.module.biz.dal.dataobject.informationtype.InformationTypeDO;
import org.apache.ibatis.annotations.Mapper;
import cn.gcyl.module.biz.controller.admin.informationtype.vo.*;

/**
 * 信息类型 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface InformationTypeMapper extends BaseMapperX<InformationTypeDO> {

    default PageResult<InformationTypeDO> selectPage(InformationTypePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<InformationTypeDO>()
                .eqIfPresent(InformationTypeDO::getInformationType, reqVO.getInformationType())
                .betweenIfPresent(InformationTypeDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(InformationTypeDO::getId));
    }

}